<template>
	<view class="wrap" style="padding-bottom: 60px;">
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">{{getTitle()}}</block>
		</cu-custom>
		<view class="header">
			<view class="userinfo">
				<view class="info" style="flex:1;display: flex;justify-content: space-between;">
					<view>
						<!-- <view class="username">{{getTitle()}}</view> -->
						<view class="usercode">{{info.pp}}</view>
					</view>
					<!-- <u-tag text="待审核" shape="circle" type="warning" style="height: 55rpx;" /> -->
				</view>
				<view class="image">
					<!-- <image :src="avatarUrl"></image> -->
					<u-avatar size="80rpx" src="/static/msg/active.png"></u-avatar>
					<!-- <image class="user-images" style="height: 40px;width: 40px;" src=""></image> -->
				</view>
			</view>
		</view>
		<!-- <u-tabs style="background: #fff;" :list="list" :scrollable="false" :current="current" @change="change"
			lineColor="#f56c6c" :activeStyle="{
            color: '#303133',
            fontWeight: '700',
            transform: 'scale(1.05)'
        }"></u-tabs> -->
		<!--  -->
		<view>
			<!-- 	具体业务单据 用章 -->
			<stamp-info v-if="info.bizType === 355" :bizType="info.bizType" :billId="info.sourceId" :mesgId="info.id"
				:viewCode="viewCode"></stamp-info>
			<!-- 出差申请 -->
			<other-city-work v-if="info.bizType === 353" :bizType="info.bizType" :billId="info.sourceId"
				:mesgId="info.id" :viewCode="viewCode"></other-city-work>
			<!-- 请假-->
			<leave-info v-if="info.bizType === 351" :bizType="info.bizType" :billId="info.sourceId" :mesgId="info.id"
				:viewCode="viewCode"></leave-info>


		</view>

	</view>
</template>
<script>
	import {
		getTodoAction,
		getAuditPageTitle,
		getUser,
		getCompanyId,
	} from '../../network/service/addressBook.js';
	import stampInfo from './bill/StampInfo.vue'
	import leaveInfo from './bill/LeaveInfo.vue'
	import otherCityWork from './bill/otherCityWork.vue';
	export default {
		components: {
			stampInfo,
			leaveInfo,
			otherCityWork,
		},
		data() {
			return {
				avatarUrl: '',
				show: false,
				list: [{
					name: '申请详情'
				}, {
					name: '查看数据',
				}],
				viewCode: '',
				// 消息info
				info: {},
				//业务对象info
				billInfo: {},
				current: 0,
				loadText: {
					loadmore: '点击加载更多',
					loading: '正在加载...',
					nomore: '没有更多了'
				},
			}
		},
		onLoad(option) {
			this.viewCode = Number(option.viewCode)
			this.info = {
				...JSON.parse(option.info),
				bizType: Number(JSON.parse(option.info).bizType)
			}
		},
		created() {},
		methods: {
			change(item) {
				this.current = item.index;
			},
			navTo(url) {
				uni.navigateTo({
					url: url
				});
			},
			getTitle() {
				return getAuditPageTitle(this.info.bizType)
			},

		}

	}
</script>
<style lang="scss" scoped>
	page {
		background-color: #f5f5f5;
	}

	.datails-examine {
		background-color: #ffffff;
	}

	.wrap .search {
		background: #ffffff;
	}

	.apply-text {
		font-size: 28rpx;
		color: #333333;

		span {
			color: #999999;
		}
	}

	.user-images {
		width: 28px;
		height: 28px;
		margin-right: 8px;
	}

	.apply-list-foot {
		font-size: 28rpx;
	}

	.personnel-list {
		display: flex;
		align-items: center;
		flex-wrap: wrap;

		.personnel-user {
			position: relative;
			margin: 5px 9px 0;
		}

		.user-images {
			width: 32px;
			height: 32px;
			margin-right: 0;

		}

		.iconfont {
			position: absolute;
			top: -12px;
			right: -5px;
			color: #FE0100;
		}
	}

	.header {
		background-color: #ffffff;

		.userinfo {
			display: flex;
			padding: 20rpx 20rpx 10rpx;

			.image {
				flex-shrink: 0;
				width: 80rpx;
				height: 80rpx;

				image {
					border-radius: 100%;
					width: 100%;
					height: 100%;
				}
			}

			.info {
				display: flex;
				flex-flow: wrap;
				padding-left: 30rpx;
				color: #333333;

				.username {
					width: 100%;
					font-size: 32rpx;
				}

				.usercode {
					padding: 0;
					font-size: 24rpx;
					color: #999999;
				}
			}
		}

		.logout {
			flex-shrink: 0;
			position: absolute;
			right: 70rpx;
			top: 65rpx;

			.u-btn {
				font-size: 30rpx;
			}
		}
	}

	.u-node {
		width: 44rpx;
		height: 44rpx;
		border-radius: 100rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #d0d0d0;
	}

	.u-order-title {
		color: #333333;
		font-weight: bold;
		font-size: 30rpx;
	}

	.u-order-desc {
		color: rgb(150, 150, 150);
		font-size: 28rpx;
		margin-bottom: 6rpx;
	}

	.u-order-time {
		color: rgb(200, 200, 200);
		font-size: 26rpx;
	}

	.u-time-axis {
		position: relative;
		background: #fff;
		padding: 15px 10px 10px 70px;
	}
</style>